package com.learn.demo.array;

import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.Collectors;

public class SortStringArray {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            String s = scanner.nextLine();
            String[] arr = s.split(",");
            // 倒叙
            // String sorted = Arrays.stream(arr).sorted(Comparator.reverseOrder()).collect(Collectors.joining(","));
            // 正序
            String sorted = Arrays.stream(arr).sorted().collect(Collectors.joining(","));
            System.out.println(sorted);
        }
    }
}
